package acm.蓝桥12;

import java.util.Arrays;
import java.util.Scanner;

public class A异或变换 {
    static int maxN = 10001;
    static int[] src = new int[maxN];
    static int[] tar = new int[maxN];
    static int n;
    static long t;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        t = sc.nextLong();
        sc.nextLine();
        String s = sc.nextLine();
        for (int i = 0; i < n; i++) {
            src[i] = (byte) (s.charAt(i) - '0');
        }
        fun();
        for (int i = 0; i < n; i++) {
            System.out.print(src[i]);
        }
    }

    static {
        int[] o = new int[]{1, 0, 1, 1, 0, 0, 1, 0, 1};
        n = o.length;
        int count = 100;
        System.out.println("o=>"+Arrays.toString(o));
        for (int i = 1; i < count; i++) {
            src= o.clone();
            t = i;
            fun();
            System.out.println(t + "=>" + Arrays.toString(src));
        }
        System.out.println("o =>"+Arrays.toString(o));
    }
    public static void fun2(){
        for (long l = 0; l < t; l++) {
            for (int i = 1; i < n; i++) {
                int cnt=i+1;
                if(t%cnt==1){
                    tar[i] = src[i] ^ src[i - 1];
                }
                tar[i] = src[i] ^ src[i - 1];
            }
        }
    }
    public static void fun() {
        tar = src.clone();
        for (long l = 0; l < t; l++) {
            for (int i = 1; i < n; i++) {
                tar[i] = src[i] ^ src[i - 1];
            }
            int[] temp = src;
            src = tar;
            tar = temp;
        }
    }
}
